package com.org.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * ClassName: MyServeList
 * Package: com.org.pojo
 * Description:
 *
 * @Author Origin
 * @Create 2024/2/14 13:02
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MyServeList {
    private Integer id; // 主键id

    @JsonIgnore
    private Integer userType; //1表示用户发起，2表示社区发起

    private String title;   //标题
    private String content; //内容
    private String img01;   //图片
    private String img02;   //图片
    private String img03;   //图片
    private String img04;   //图片

    @JsonIgnore
    private Integer createId;    //发起人id


    private Integer communityId;    //所属社区
    private Double duration;    //服务时长
    private String type;    //类型
    private Integer numPeople;  //需要人数
    private Integer numJoin;    //当前参加人数

    private String state;   //状态：草稿 | 审核中 | 已发布 | 进行中 | 已结束 | 已删除


    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "UTC")
    private LocalDateTime startTime;    //开始时间

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "UTC")
    private LocalDateTime endTime; //结束时间


    @JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间

    @JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss")
    private LocalDateTime updateTime;//更新时间

    //社区内容
    @NotEmpty
    private String province;    //省份

    @NotEmpty
    private String city;    //市

    @NotEmpty
    private String districtOrCountry;   //区或县

    @NotEmpty
    private String name;    //街道或社区名字

    //创建人是自己不展示
}
